/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pkl53.view;

import java.awt.CardLayout;

/**
 *
 * @author akhul
 */
public class LoginPanel extends javax.swing.JPanel {

    private static final long serialVersionUID = 4589049657268136061L;

    private final CardLayout cardController;

    /**
     * Creates new form loginPanel
     */
    public LoginPanel() {
        initComponents();

        cardController = (CardLayout) containerPanel.getLayout();
        //pertama nampilin loading dulu, terus pindah ke login
        cardController.show(containerPanel, "loginPanel2");

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        login1 = new pkl53.imageClass.Login();
        containerPanel = new javax.swing.JPanel();
        loginPanel21 = new pkl53.view.LoginPanel2();

        setLayout(new java.awt.BorderLayout());

        containerPanel.setOpaque(false);
        containerPanel.setLayout(new java.awt.CardLayout());
        containerPanel.add(loginPanel21, "card2");

        javax.swing.GroupLayout login1Layout = new javax.swing.GroupLayout(login1);
        login1.setLayout(login1Layout);
        login1Layout.setHorizontalGroup(
            login1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(login1Layout.createSequentialGroup()
                .addGap(525, 525, 525)
                .addComponent(containerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(324, 324, 324))
        );
        login1Layout.setVerticalGroup(
            login1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(login1Layout.createSequentialGroup()
                .addGap(383, 383, 383)
                .addComponent(containerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(164, Short.MAX_VALUE))
        );

        add(login1, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel containerPanel;
    private pkl53.imageClass.Login login1;
    private pkl53.view.LoginPanel2 loginPanel21;
    // End of variables declaration//GEN-END:variables

    public LoginPanel2 getLoginPanel2() {
        return this.loginPanel21;
    }
}
